#!/bin/bash

if [ -f "/bin/megacli" ];then
# bottom disk config 
r_level=$1
f_disk=$2
s_disk=$3
c_addr=$4
megacli  -CfgLdAdd -r$r_level[$f_disk,$s_disk]  -a$c_addr
megacli  -LDSetProp -CachedBadBBU -Lall -aAll
elif [ -f "/sbin/megacli" ];then
# bottom disk config 
r_level=$1
f_disk=$2
s_disk=$3
c_addr=$4
megacli  -CfgLdAdd -r$r_level[$f_disk,$s_disk]  -a$c_addr
megacli  -LDSetProp -CachedBadBBU -Lall -aAll
else
echo "Please install disk tools"
fi
